<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="box">
      hello
      <div>
        <p>this is tag p</p>
        <ul>
          <li>1</li>
          <li>2</li>
          <li>3</li>
          <li>4</li>
        </ul>
      </div>
    </div>

    <ul>
      <li>1</li>
    </ul>
    <script>
      /*
        所有的元素对象都可以调用 querySelectorAll，querySelector，
      */
      const box = document.getElementById("box");
      console.log(box.querySelectorAll("ul"));

      console.log(document.querySelectorAll("#box ul"));

      console.log(document.querySelectorAll("ul"));
    </script>
  </body>
</html>
